//获取附近空闲的路
params ["_pos"];

//选择道路（附近无载具建筑）
private _roads = [];
_roads = (_pos nearRoads 300) select
{
	private _nearObj = [];
	_nearObj = nearestObjects [position _x, ["Car","Tank","Air","House", "Building"], 2];
	((count _nearObj) == 0)
};

//无玩家
_roads = _roads select
{
	private _roadPos = _x;
	{
		if(_x distance2D _roadPos < 320) exitWith
		{
			false
		}
	}forEach (call fn_getPlayerRed);
	true
};



if (count _roads == 0)  then
{
//随机选点
	_pos = _pos getPos [20 + random 80, random 360];
}
else
{
	_pos = position (selectRandom _roads);
};


_pos


